import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "@/style/main.scss";
import "normalize.css/normalize.css";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import http from "@/utils/request";
import api from "@/api";
import dayjs from "dayjs";
import * as relativeTime from "dayjs/plugin/relativeTime";
import "dayjs/locale/zh-cn"; // import
import RichText from "./plugins/richtext";

import "quill/dist/quill.core.css"; // import styles
import "quill/dist/quill.snow.css"; // for snow theme

Vue.use(RichText);

dayjs.extend(relativeTime);
dayjs.locale("zh-cn"); // use locale

import { Notification, Message, MessageBox } from "element-ui";

Vue.use(ElementUI);

Vue.config.productionTip = false;

Vue.prototype.$http = http;
Vue.prototype.$api = api;
Vue.prototype.$dayjs = dayjs;

Vue.prototype.$notify = Notification;
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
